package blackberryAppCom;

public class BBApp_Exception extends Exception {
	private String lStrErrorStatus;
	private String lStrErrorCode;	
	
	/**
     * Overloaded constructor that allow the exception parameter object 
     * to be set as the root cause of this exception.
     * 
	 * @param fStrStatus       holds the status of the exception.
	 * @param fStrErrorCode    holds the error codeof the exception.
	 * @param fException       the exception to be set as root cause, if any.
     * @return 
	 */
	public BBApp_Exception(String fStrStatus,
        String fStrErrorCode, 
        Exception fException ) {
        this( fStrStatus, fStrErrorCode );
        this.initCause(fException);
    }
        
	/**
     * Default constructor
     * 
     * @param fStrStatus       holds the status of the exception.
     * @param fStrErrorCode    holds the error code of the exception.
	 * @return 
	 */
	public BBApp_Exception(String fStrStatus,String fStrErrorCode){
		lStrErrorStatus	= fStrStatus;
		lStrErrorCode	= fStrErrorCode;
	}
    
    /**
     * Return the error status of the exception.
     * 
	 * @return error status of the exception.
	 */
	public String fnGetMessage() 
    {
		return lStrErrorStatus;
    }
        
        
	/**
     * Return the error code of the exception.
     * 
	 * @return erorr code of the exception.
	 */
	public String fnGetCode() {
		return lStrErrorCode;
	}
}
